home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d8
/
wterm107.arc
/
WTERM.DOC
< prev
next >
Wrap
Text File
|
1991-03-30
|
36KB
|
751 lines
┌──────────────────────────────────────────────────────┐
│ │
│ \/\/term (C)Copyright \/\/alter Cox 1990, 1991. │
│ All rights reserved. │
│ │
│ \/\/term DOCumentation │
│ │
│ Version 1.07 │
└──────────────────────────────────────────────────────┘
Introduction
WTERM is a bare bones comm program that should be
adequate for use with most bulletin boards. Users with
limited disk and/or memory may find it especially
useful. There is no script language and no terminal
emulation. There is no built-in ANSI support so you
must load an ANSI driver in your CONFIG.SYS file.
There is no scrollback buffer, however WTERM writes a
file named WTERM.LOG and strips ANSI from it. You can
use LIST to view this file and aside from the slight
delay to load it, it works better than a scrollback
buffer with search capabilities. The log can be toggled
on and off if you desire. More on this later.
No file transfer protocols are built-in. WTERM relies
on external protocol drivers like DSZ (tm) and PCZ for
file transfers. DSZ is shareware and PCZ is Public
Domain. The Zmodem upload and download strings are
detected automatically. The Zmodem driver you have
configured is then called.
A 16550AN UART is automatically detected and activated
with the FIFO trigger level set for 8.
An editor of your choice may be configured and loaded at
the touch of a function key. A few good free editors
are EDWIN, Turbo Powered Editor(TPE), and VDE. For a
tiny free editor, you might want to take a look at TED
by PC Magazine. Another fine shareware editor which
many seem to be using is Qedit (tm).
Setup
WTERM has an internal setup utility. If no WTERM.CFG
file exists when WTERM loads, it automatically loads
setup and will not let you out of it until you write a
setup file. When you wish to view or change the
configuration, press ALT-S. Use the capital letter
associated with any parameter to change that parameter.
First press U and enter your name. This is the name
that will be transmitted by WTERM when you press the F2
key. A line will appear in reverse video showing how
many characters are allowed for this entry. Enter your
name and press enter. An enter will be appended to the
name automatically. In the next line, configure the
drive, path and filename of the editor you wish to use.
See the section below on line editing for an
explaination of how the line editor works.
Setup - Modem
Port, Speed, pArity, Bits, and sTopbits are all toggles.
Press the capital letter for a given entry to select the
value you desire.
Modem initialization string also uses the line editor.
To send an enter (carriage return) use |. For a one
second pause, use a ~. If you have been using another
comm program, use the modem initialization string you
used for it. The initialization string included in the
example works with my modem but is mainly there to fill
the space and give an example. There are too many
modems out there to come up with one string that works
for all and no attempt has been made to do so. Consult
the manual that came with your modem for the proper
commands.
HST users NOTE: The HST has trouble loosing it's
initialization after an ALT-H, so sending the
initialization afterwards was added for it. A delay was
also needed, so you may need to add one or two "~" in
front of the initialization string.
When a connection is made, WTERM looks at the CONNECT
string returned and tries to switch to the speed of
connection. Some users of fast modems wish to lock
their comm port at a higher rate and let their modem
switch to the speed of the line. Lockbaud set to on
will prevent WTERM from changing the port speed. If set
to no, it will set the port to the speed of the connect.
You may configure a dialing prefix, the string WTERM
will send to the modem before sending the number to
dial. Users with Hayes compatible modems with touchtone
phones will not have to change the default ATDT. If
your line only supports pulse dial, change it to ATDP
instead. You may add a | in front of the dialing prefix
to make sure the command is seen by the modem as the
first characters in a line.
WTERM has both Xoff/Xon and hardware (RTS) flow control.
The F key toggles from None, to Xoff/Xon, to Hardware,
to both and back to none. Flow control works only one
direction. It prevents the modem from overrunning it
but doesn't pay attention to CTS to prevent overruning
the modem. Since keyboard input isn't fast enough to
overrun anything and ASCII transmits can use the pace
character timing, it shouldn't be needed. Users of
modems faster than 2400 baud should set hardware flow
control.
Setup - Protocols
WTERM detects the start of a Zmodem download or upload
and calls the protocol you have configured. If you
chose to use a protocol other than Zmodem, you can turn
this option off by setting autoZmodem to no. If this
feature is desired, leave it at the default yes.
The next option, asCii pace time, sets the number of
msecs. between characters transmitted with an ALT-T
transmit or with an ALT-M message upload. You can set
this time between 0 (no delay) and 999 msec. - very
extreme. Adjust this speed if the boards you use have
difficulty with your speed of transmission.
Options 1 and 3 set the drive and path for your default
up and download directories. When you begin an upload,
WTERM changes to the directory you enter in 1. For a
download it switches to the drive and directory you have
configured in 3. Using this option and the %S (speed)
and %P (port), you can set up your protocol (such as
PCZ) to up and download without using batch files. See
the section on file transfers below for more
information.
Option 2 sets up the external protocol driver used for
an upload. Enter the name of the program and any
options needed. When WTERM detects the start of a
Zmodem upload, it checks to see if the last filename it
saw is in the upload directory. If it is, it does not
prompt for a filename but immediately starts the upload.
If you press PgUp before the upload starts, it prompts
for a filename and adds the name of the last file seen
as a default which you can edit, or just hit return to
start the upload. The name of the default directory to
be used is displayed in the filename prompt, the one
configured in 1. It can be overridden by specifing the
path. This of course assumes that you have not set
autoZmodem to no. If your protocol driver is not in
your path or in your upload directory, make sure you
enter the drive and path as well. If you need to tell
the driver the port and speed, use %P for port and WTERM
will replace it with the port in use. Speed works the
same way. Add %S and it will be replaced by the current
speed. This allows the same string to work at multiple
speeds. While you can use batch files to load the
driver, hopefully you will not have to with the options
available to you.
The download string (4) works the same way the upload
string works. It does not prompt for a filename since
the sender sends the filename to the receiver (with
Zmodem).
NOTE: In early versions of WTERM, you needed to add a
trailing backslash to the paths to the up and download
directories. This backslash is no longer needed. Enter
the drive and path exactly as you would if you were
doing a CD (change directory). This is exactly what
WTERM does before calling the drivers.
PgUp will call up the driver configured as the upload
protocol as though a Zmodem upload string had been
detected. It prompts for a filename. PgDn calls up the
download protocol and does not prompt.
External protocol menu programs can be installed on one
of the ALT-Function keys as a DOS command to give you a
choice of protocols. One I used with ProComm was POE
(Procomm Outside Environment) and it worked well on a
WTERM function key. Thought was given to adding such a
thing internally to WTERM but since some users (like me)
use Zmodem exclusively, it was left out to make WTERM as
small as possible.
Setup - switching pages, Writing the configuration or
quit.
The bottom line of both setup pages displays a help
line. The spacebar switches between the two pages of
setup. W, Write, saves the current configuration to the
configuration file WTERM was loaded with. Escape quits
setup without saving the changes, although they are
active for the current session.
Setup - Page 2, Function keys
Function keys F4 through F8 are strings you can enter
that will be transmitted at the touch of the function
key. As with the modem initialization string, a | will
cause an enter to be transmitted and a ~ will generate a
one second pause.
Setup - DOS Commands
Up to five DOS commands can be configured using ALT-F1
through ALT-F5. Enter the commands the way you would if
you were at the DOS command line. Once configured,
WTERM will run the command when that function key is
pressed. After the command finishes, WTERM displays a
"Pause...". Press any key when you wish to return to
WTERM. The screen is then restored as it was before the
command was run.
Setup - Misc.
WTERM can sound an alarm when a connection is made.
Connect tone can be set to the tone that will be
sounded. Setting it to 0 will disable the option. The
tone you enter will be sounded five times. Start with
something like 1100 and adjust the tone to your liking.
The higher the tone, the higher the frequency sounded
etc.
BIOS writes can be enabled and disabled. If you run DV
and have a bleed through problem or if you have CGA and
have a snow problem, toggle this option to Y.
Line Editor
The line editor used in WTERM for the dialing directory
entries and the setup strings, has several options. A
^K will Kill the current entry so that you can start
over again. Left and right arrows work as you would
expect, to position the cursor to the place you wish to
make a change. You may insert and delete characters.
When in insert mode, the cursor is made larger. Tab or
Escape quits editing without any changes while enter
saves the changes. The field you have to work in is
black on white in the default color configuration but
may be changed with the debug color scripts. If you
change the colors, make sure the editing colors are
noticeable with the colors you have selected.
Note: Make sure you don't add extra spaces to the end
of a string. WTERM will not remove them and they can
cause you trouble in some fields. The End key will stop
at the end of the string as will the right arrow key.
Using multiple CFG and DIR files
You can specify a drive and path for the .CFG and .DIR
files that WTERM will use by using command line options.
To specify a .CFG file in other than the default directory,
use a command line option of:
WTERM -C[drive][path]filename
For a different phone directory use the -F option
WTERM -F[drive][path]filename.
Once in the dialing directory, you can load another
directory with Alt-L.
File Transfers
The only provision for binary file transfers is through
the use of external protocol drivers. Either DSZ (tm)
or PCZ is recommended. Other protocols can be used as
well but you should turn off the autozmodem option if
you do.
Set up the external protocol by doing an ALT-S from the
terminal screen, as explained above. WTERM will pass
the current speed an port settings. To pass the port,
use %P; speed is %S. WTERM will expand the % variables
to the proper value when executing the command line. A
simple example of a Zmodem download using COM1 - COM4
could be written like so:
DSZ port %p speed %s rz
DSZ defaults to the correct speed so it is not necessary
to use speed on the command line. You can also set an
environment variable for the comm port - SET DSZPORT=2.
Having done that, the above command line could be
reduced to:
DSZ rz
PCZ however defaults to 2400 baud. To make the command
line work at all available speeds, use of the %S
parameter is necessary.
PCZ 1 %s rz
PCZ's command line looks much line DSZ except that the
words "speed" and "port" are optional. You can hardcode
the port as in the above example or use %p since your
modem normally stays on the same port.
You should be able to call most any protocol driver
directly without the use of batch files, but batch files
can be used if necessary.
Much could be written on interfacing protocol drivers
but that is beyond the scope of this DOC file. Read the
DOC that comes with the protocol driver you are going to
use and it should provide enough information to write
the proper command lines.
WTERM checks incomming data for valid filenames and
saves the last filename found. If you are in autoZmodem
mode and WTERM detects the Zmodem upload string, it
checks the upload directory to see if the last filename
seen exists. If it does, the filename prompt is skipped
and an automatic upload started. This will cause
problems with batch uploads since only the last filename
will be uploaded. You can either turn off autoZmodem in
setup or hit the PgUp key before receiving the Zmodem
upload string. When this key is used, WTERM will pop up
the filename prompt with the name of the last file seen.
You can kill the filename with ^K if you want or hit
enter if the correct filename was chosen. PgUp does not
do auto uploading and gives you a chance to change the
filename or add additional filenames if desired.
ASCII Transfers
The ALT-T (Transmit an ASCII file) and ALT-R (Receive an
ASCII file) are intended for use in uploading and
downloading messages. The ALT-T command strips
linefeeds from the file and expands a blank line to a
space carriage return. A small delay is built-in after
sending a carriage return (about 3 msec.). This command
can only be used online. I did this because I tried it
offline and confused the heck out of my modem.
The ALT-R receive a file is mainly intended for use with
the ALT-M option explained below. It strips ANSI
commands for incoming text. This mode is automatically
turned off when the ALT-M command is executed.
WTERM has pace character timing as an option. You can
set the time between characters from 0 to 999 msec.
When using the ALT-M option, a check will be made for
carrier before doing the upload. If no carrier is
detected, WTERM assumes you are not online and does not
do the upload.
Operation
F1 displays a Help screen. Hit any key to resume and the
screen will be restored. The following functions may be
found on the help menu:
ALT-X eXit WTERM back to DOS
ALT-J Jump to DOS
ALT-H Hangup
ALT-C Clear the screen
ALT-D Dialing directory
ALT-N Exit the program leaving DTR and RTS high
ALT-M Message reply online using your own editor
ALT-R Receive an ASCII file to WTERM.MSG
ALT-S Setup utility
ALT-T Transmit an ASCII file
PgUp Transmit a file using DSZ Zmodem
PgDn Receive a file using DSZ Zmodem (in case Auto Zmodem
dosn't work)
F1 Help Menu
F2 Transmit your name
F3 Transmit your password
F4-F8 Transmit string from .CFG file
F9 Load LIST for file viewing
F10 Load your Editor
The Dialing Directory
Press Alt-D from the terminal screen to enter the
dialing directory. All 20 entries in a directory are
displayed. Additional directories can be loaded with
the Alt-L command. The box at the bottom of the screen
is a help/status line. It will show you that you can
scroll the scrollbar with the up and down arrow keys and
get more help by using the left and right arrow keys.
Once you dial, the line becomes a status line, showing
you what board you are currently dialing and the seconds
until redial. Add S7=45 to your modem initialization
string to make it accurate. When you get a connect or a
busy etc., the status line shows you the string returned
by the modem such as CONNECT 2400 or BUSY. In the Que
mode, it will countdown five seconds and dial another
number. There is a clock at the lower right side of the
screen.
Here are the commands available to you in the dialing
directory:
Escape Escape will return you to the terminal mode.
If you are dialing, escape will abort the dial.
Up and down arrows Scroll the scrollbar to select an
entry.
Left and right arrows Scroll through the help lines in
the help/status line.
Home Move the scrollbar to the first entry.
End Move the scrollbar to entry 20.
Alt-P Toggle the display of Passwords on and off.
The default is off.
Alt-L Load another dialing directory. You will be
prompted for the name of another directory to
load. The name of the directory currently
loaded will be displayed in the center of the
line above the box. The size allowed for the
filename will be displayed in white.
Alt-E Edit an entry. The entry the scrollbar is on
will be edited. Escape or tab will skip a
field leaving it unchanged. Enter will clear
the field. A white box (this can be changed
with the color and mono batch files) will
define the width of the field.
1 - 0 Hot keys to dial entry 1 through entry 10.
Shift 1 - 0 Hot keys to dial entry 11 through 20.
Q Que mode. Que and the number of queued entries
will be displayed in the center of the line
above the help/status line. An entry is queued
by selecting it with the scrollbar and pressing
the spacebar. To unque a single entry, press
the spacebar again. Que mode is automatically
turned off when making connection with the last
entry on que. A checkmark is displayed beside
the entry number for entries queued. Once a
connection is made, if there are other entries
queued, WTERM looks for NO CARRIER and the
carrier detect signal to drop. When it sees
this, it switches back to the dialing directory
and starts the 5 second pause and then dials
the next number in the que automatically. Once
the que is built, you can go through the entire
que without manually dialing again.
C Clear all entries on que and quit que mode.
Enter Dial the entry at the scrollbar or start que
dialing. If you are in the que mode but no
entries are queued, the current entry is
queued.
The default name for the dialing directory is WTERM.DIR.
The parameter field should contain the speed, parity,
bits per character and number of stop bits the entry
should be dialed at. For 2400 baud, no parity, 8 data
bits and 1 stop bit, you should enter 2400N81. Speeds
through 19200 are supported.
Once you have created the dialing directory, select an
entry and hit enter to dial it. When you get to the
name prompt, F2 will send your name as you have it in
the configuration file. At the password prompt, F3 will
send the password you have entered for that entry.
Log file
WTERM opens a log file when a connection is made. ANSI
is stripped from the data written to the file. You may
view the log at anytime if you have LIST configured by
pressing ALT-L. The file will be saved until another
connection is made, at which time it is reopened with
the old contents destroyed. This keeps the log file
from growing.
You can toggle the log on and off with ALT-O. Just be
aware that if you turn it off, you lose the ability to
view text that has scrolled off your screen. Floppy
users may want to turn it off and find a PD scrollback
program. While there is no option in setup to save the
On/Off status, it can be saved by going into setup and
just saving it to disk. The next time you load Wterm,
it will then remember weither to turn it on or off.
Respond to messages and quote them using your own full
screen editor locally
The ALT-M command works in conjunction with ALT-R to
allow you to quote a message and respond to it locally
using your own full screen editor and then automatically
upload the reply while still online.
To use it, once you find a message to which you would
like to respond and quote, type ALT-R. This will open a
file named WTERM.MSG and any characters received are
written to it. ANSI is stripped out. Display the
message again so that it is captured to the file. Then
hit ALT-R again. ALT-R is a toggle and hitting it the
second time will close the file.
At this point you start your reply just like you
normally would. After entering to TO and the SUBJECT
and get to the point you would start entering your
message, hit ALT-M. WTERM then captures the timer tick
interrupt and installs a program that keeps the board
from timing out. It first sends a message to the sysop
which the user will not see which says "Editing message
offline. Please wait...". This lets the sysop know
what is going on while you are in your editor. It then
sends a space a half a second later and in another half
second, a backspace. This is done the entire time you
are in your editor. PCBoard(tm) will not time out with
this routine (it would with the backspaces only as it
use to be).
After the space/backspace routine is installed it shells
to DOS and bring up your editor editing WTERM.MSG. If
you used ALT-R to copy the message into WTERM.MSG, you
are ready to start editing your message - picking out
what you wish to quote and writing your response. I
not using ALT-R and using the .LOG file myself. If you
do this, WTERM.MSG will be the last message you sent.
Clear the editor and read in WTERM.LOG. Mark the start
of the message and go to the end, then page back to the
start of the message you wish to quote or respond to.
Mark the start of that message and kill from that point
back to the start of the file. Then go to the end of
the message and kill from that point to the end and you
are now ready to start your quotes and response.
Reformat for line length and add the ">" to it. A
editor that can do macros is useful here.
Once you exit your editor, you are put back into WTERM,
and the space/backspace routine is removed. There is a
short delay while a string of backspaces is sent to
remove the sysop message to keep it from becoming a part
of your message. The screen is then restored and your
message is automatically uploaded. If it gets garbled
with noise, quit and start your reply again and then do
an ALT-T and enter WTERM.MSG as the filename and upload
it again.
Jumping to DOS
When you jump to DOS using ALT-J, the comm port remains
active. Assuming the receive buffer doesn't overflow,
when you return to the program, the screen will be
restored and data received while in the shell will be
displayed. While you are in the shell, the DOS prompt
is changed to the current drive and path enclosed in
curly brackets. The F1 key is reassigned using ANSI so
that pressing it will cause it to send EXIT and you will
be returned to WTERM. Of course you can also type EXIT
to return. You don't have to change back to the
directory WTERM is in before you type EXIT. WTERM
always changes the default directory to it's own. If
it is loaded from another drive it will change to its own
drive and directory. Just add the WTERM directory to
your path and you can load it from any drive and
directory on your system.
Exiting WTERM
There are two ways to exit WTERM. By using ALT-X, you
are returned prompted whether you really want to quit or
not. Hit Y or enter to quit. N clears the prompt and
leaves you in WTERM. When you exit, the comm port is
reset and the controls are turned off. This will cause
the modem to hangup if you are connected.
To exit WTERM with the controls left high, use ALT-N.
If you enter WTERM again while still connected, it
detects carrier and will not send the modem init string.
This allows you to exit to DOS and have all of your RAM
to do with as you wish.
Color Configuration
WTERM colors can be configured using DEBUG scripts
included in this package. MONO.SCR is included for
users with monochrome monitors. While this is not the
most convenient way of doing this, it does save space
and programming and helps keep WTERM small. The
following files have to do with colors:
COLORS - gives the default colors, codes, and locations.
WTCOLOR.BAT - a batch file to run DEBUG and take the
script file COLOR.SCR as input.
COLOR.SCR - the default color configuration that can be
edited with an ASCII editor to colors of your own
choice. COLORS gives information you will need
to make your selections.
WTMONO.BAT - a batch file to run DEBUG and take the
script file MONO.SCR as input.
MONO.SCR - a script file that sets the colors to black
and GRAY or WHITE for use with monochrome
monitors. Acknowledgement
Acknowledgements
After looking at several C source comm routines, I chose
the one used from a file named COMM.ZIP by Mario
Grannini. It was modified in several places but still
retains a good bit of his work. It is a good example of
C programming and was easily modified for use with
WTERM.
My thanks to Roland Brown, world famous author of Opus
Message Kit (OMK) for his help and encouragement
(nagging :-)), ideas, and beta testing. He got a chance
to get back at me for my "help" with OMK here.
WTERM Utilities
PC Magazine published a program named SNIPPER. This
program is a TSR (Terminate and Stay Resident) program
that allows you to mark off a block of text on your
screen and save it to a buffer, to disk, or print it.
Others have modified and improved upon it. It has
proven to be useful for BBS use in quoting messages.
The latest version I could find was version 2.2. I
modified this version for was use in quoting with WTERM.
It adds "> " to the start of each line and saves to a
file with a default name of WTERM.MSG. The original
version always appended to this file. I modified it to
and gave the user the option of appending or of creating
a new file with only the latest block of text. When
used in the file mode, either Append or File, and saved
to WTERM.MSG it is especially useful in writing messages
using your own full screen editor (ALT-M option). Your
editor is loaded with the text you have quoted already
in it. For boards with editors fast enough to handle
the speed, you can save to the buffer and do a Get when
ready to insert the quote. On boards that can't handle
the speed, you will have to use the ALT-M mode which
does an ASCII upload. This program is named
WT-QUOTE.ZIP and includes the ASM source code.
PCZMOUSE PCZMOUSE is a Logitech (MS compatible) mouse
menu for use with Wterm. PCZ is an external protocol
driver that can add several protocols including Zmodem
to any comm program and is PD. With this menu and PCZ,
WTERM can have the following protocols: Xmodem,
1K-Xmodem, Ymodem, Zmodem, and Sealink. The source for
this menu as well as Daryl's below is included so you
can combine the two easily if you desire or use either
or none.
WTERM utilities by other authors
Thanks to Daryl Martin, a mouse program is included.
Daryl gave his permission to do so. I left his file
exactly as I received it. UnZip it and give it a try if
you have a mouse.
Tom Collins wrote a program that makes setting the
colors much easier. The name of the program is
WTC105A.ZIP. While I am not sure it will save the
status of BIOS writes and the log toggle, you should be
able to use it and then get in WTERM, set the logger on
or off, set BIOS writes to Y if you desire and save the
configuration. Perhaps Tom will come out with a WTC106
now if it doesn't work.
Legal Stuff
DSZ mentioned above is shareware and is not free
software. If you use it, you should register it and pay
the reasonable $20 registration fee. LIST is free for
personal use though the author does except
contributions. Both programs are copyrighted by their
authors. PCZ is public domain and copyrighted. SNIPPER
is copyright PC Magazine.
While a license is freely granted for use of this
program, I do retain a copyright and reserve all rights
to it. You may not charge for WTERM. The only
exception to this is for computer clubs. They may
charge up to $3.00 plus actual postage for a diskette
containing WTERM. WTERM can not packaged with any
product or sold by shareware disk dealers.
No version of WTERM is to be distributed in modified
form. Distribute it exactly as is. The only exception
to this is that boards wishing to include their boards
in the dialing directory may do so IF they do not remove
the boards that are already in it. Those people helped
with WTERM development and rightfully deserve to be
there.
Since this is a free program and I gain nothing from it,
I also assume no responsibility should you decide to use
it. Although it seems to work fine on my AT compatible,
it may not work on your system. You assume all
responsibility for ANYTHING that happens if you choose
to run WTERM. By running it, you agree to these terms.
Support
None. If you feel you need support, look at some of the
fine user supported software on the boards. The reason
you do not see an address or phone number in this file
is because I do not wish to support a free program. I
certainly will not return long distance calls on my
dime. If you happen to know me, DO NOT ATTEMPT TO CALL
ME AT WORK! My employer is paying for my time and I
owe it to him. I will be less happy with you than he.
For the most part you are on your own. Feel free to ask
questions in the local BBS message areas where I can
respond at my leisure. If you use it in your business,
hire someone to support it. Don't expect me to do it
for free. Sorry, but this is a hobbyist effort and I
don't want it to go further than that.
\/\/alter Cox